
package me.zhengjie.rest;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.base.AjaxResult;
import me.zhengjie.domain.AppAbout;
import me.zhengjie.service.AppAboutService;
import me.zhengjie.service.dto.AppAboutQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
* @website https://el-admin.vip
* @author IQW
* @date 2022-08-10
**/
@RestController
@RequiredArgsConstructor
@Api(tags = "单文章管理")
@RequestMapping("/api/about")
public class ApiAboutController {

    private final AppAboutService appAboutService;

    @GetMapping
    @ApiOperation("查询单文章")
    public AjaxResult queryAppAbout(AppAboutQueryCriteria criteria){

        return AjaxResult.success(appAboutService.findById(criteria.getId()));
//        return new ResponseEntity<>(appAboutService.queryAll(criteria,pageable),HttpStatus.OK);
    }


}